package com.wuzuqing.android.eightdiagrams.term;

public class LunarMonth {
    public int year;
    public int month;
    public int dayCount;
    public int firstJulianDay;


    public LunarMonth(int year, int month, int dayCount, int firstJulianDay) {
        this.year = year;
        this.month = month;
        this.dayCount = dayCount;
        this.firstJulianDay = firstJulianDay;
    }

    public int getYear() {
        return this.year;
    }

    public int getMonth() {
        return this.month;
    }

    public int getDayCount() {
        return this.dayCount;
    }

    public int getFirstJulianDay() {
        return this.firstJulianDay;
    }

    public boolean isLeap() {
        return this.month < 0;
    }

    @Override
    public String toString() {
        return this.getYear() + "年" +
                LunarUtil.MONTH[Math.abs(this.getMonth())]
                + "月(" + this.getDayCount() + ")天";
    }

   public static LunarMonth _(int lunarYear,int lunarMonth,int dayCount,int firstJulianDay) {
        return new LunarMonth(lunarYear, lunarMonth, dayCount, firstJulianDay);
    }
}